﻿@inherits LayoutComponentBase

<BitAppShell @ref="_appShellRef" PersistScroll>
    <BitLayout HideNavPanel="_isHomePage" NavPanelWidth="_isNavPanelOpen ? 0 : 14 * 16" StickyHeader>
        <Header>
            <AppHeader IsHomePage="_isHomePage" OnToggleNavPanel="() => _isNavPanelOpen = true" />
        </Header>
        <NavPanel>
            <BitNavPanel @bind-IsOpen="_isNavPanelOpen"
                         Top="65"
                         NoPad NoToggle
                         Items="_navItems"
                         Style="width:222px"
                         SearchBoxPlaceholder="Search component"
                         SearchBoxStyles="@(new() { Root = "padding-inline:8px" })" />
        </NavPanel>
        <Main>
            <div class="site-content">
                @Body
            </div>
        </Main>
        <Footer>
            <AppFooter AppShell="_appShellRef" />
        </Footer>
    </BitLayout>
</BitAppShell>

<BitModalContainer ModalParameters="@(new() { AutoToggleScroll = true, ScrollerSelector = "#BitAppShell-container" })" />

<AppAiChatPanel />
